<script type="text/javascript">
  function test()
  {
    
  }
</script>
<form id="iCartForm" onsubmit="test();" enctype="multipart/form-data" method="post" target="_self" action="javascript:void(0)">
<input type="Submit" value="f">
</form>